package com.topone.dataObject;

import lombok.Data;
import org.hibernate.annotations.DynamicUpdate;
import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.annotation.LastModifiedDate;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;

import javax.persistence.Entity;
import javax.persistence.EntityListeners;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import java.util.Date;

/**
 * Created by Administrator on 2017/12/6,0006.
 */
@Entity
@Data
@DynamicUpdate
@EntityListeners(AuditingEntityListener.class)
public class CouponCategory {
    @Id
    @GeneratedValue
    private Integer categoryId;
    private String categoryName;
    private Integer couponType;
    @CreatedDate
    private Date createTime;
    @LastModifiedDate
    private Date updateTime;

    public CouponCategory() {
    }

    public CouponCategory(String categoryName, Integer couponType) {
        this.categoryName = categoryName;
        this.couponType = couponType;
    }
}
